from django.db import models

class Computer(models.Model):
    comp_ID = models.CharField(max_length=10)
    comp_Status = models.CharField(max_length=50)

    def __unicode__(self):
        return u'%s %s' % (self.comp_ID, self.comp_Status)

class Request(models.Model):
    request_ID = models.CharField(max_length=10)
    request_date = models.CharField(max_length=10)
    request_time = models.CharField(max_length=10)
    request_com_ID = models.CharField(max_length=10)


class Admin(models.Model):
    admin_ID = models.CharField(max_length=30)
    admin_Name = models.CharField(max_length=40)
    admin_Email = models.EmailField()

class Fixer(models.Model):
    fixer_ID = models.CharField(max_length=6)
    fixer_Name = models.CharField(max_length=30)
    fixer_Email = models.EmailField(blank=True)
    def __unicode__(self):
        return self.fixer_Name

class History(models.Model):
    his_date = models.DateField()
    his_com = models.ForeignKey(Computer)
    his_fixer = models.ManyToManyField(Fixer)

